import { request } from '@/utils';
import { getRestBaseUrl } from '@/config';

// 新增
export const save = scriptInfo =>
  request({
    url: `${getRestBaseUrl()}/iop/scriptService/save`,
    method: 'POST',
    data: { scriptInfo },
    timeout: 3 * 60 * 1000,
  });

// 修改
export const update = scriptInfo =>
  request({
    url: `${getRestBaseUrl()}/iop/scriptService/update`,
    method: 'POST',
    data: { scriptInfo },
    timeout: 3 * 60 * 1000,
  });

export const get = id =>
  request({
    url: `${getRestBaseUrl()}/iop/scriptService/get`,
    method: 'POST',
    data: { id: id },
    timeout: 3 * 60 * 1000,
  });
